extends ../layout

append css
    link(rel='stylesheet', href='/components/font-awesome/css/font-awesome.css')
    link(rel='stylesheet', href='/css/admin.css')

block main
    block header
        nav.navbar.navbar-inverse.navbar-fixed-top
            .container-fluid
                .navbar-header
                    button.navbar-toggle.collapsed(type="button", data-toggle="collapse", data-target="#navbar", aria-expanded="false", aria-controls="navbar")
                        span.sr-only Toggle navigation
                        span.icon-bar
                        span.icon-bar
                        span.icon-bar
                    a.navbar-brand(href="#") Node博客系统
                #navbar.navbar-collapse.collapse
                    ul.nav.navbar-nav.navbar-right
                        li
                            a(href="#") Dashboard
                        li
                            a(href="#") Settings
                        li
                            a(href="#") Profile
                        li
                            a(href="#") Help
                    form.navbar-form.navbar-right
                        input.form-control(type="text", placeholder="Search...")

        .container-fluid
            .row
                .col-sm-3.col-md-2.sidebar
                    ul.nav.nav-sidebar
                        li(class={active: pageName === "/admin/posts"})
                            a(href="/admin/posts")
                                i.fa.fa-files-o
                                | &nbsp;文章列表

                        li(class={active: pageName === "/admin/posts/add"})
                            a(href="/admin/posts/add")
                                i.fa.fa-pencil
                                | &nbsp;添加文章
                        li(class={active: pageName === "/admin/categories"})
                            a(href="/admin/categories")
                                i.fa.fa-align-justify
                                | &nbsp;分类列表
                        li(class={active: pageName === "/admin/categories/add"})
                            a(href="/admin/categories/add")
                                i.fa.fa-plus
                                | &nbsp;添加分类

                    ul.nav.nav-sidebar
                        li(class={active: pageName === "/admin/users/password"})
                            a(href="/admin/users/password")
                                i.fa.fa-lock
                                | &nbsp;修改密码
                        li

                .col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2.main
                    != messages()
                    block content


